package com.py.purchase.service;

import java.util.List;
import java.util.Map;

import com.py.purchase.domain.OdPurchaseDetails;
import com.py.purchase.domain.OdPurchaseOrder;
import com.py.purchase.domain.SysDept;
import com.py.purchase.domain.SysUser;
import org.apache.ibatis.annotations.Param;

/**
 * 进货订单Service接口
 * 
 * @author 童佳
 * @date 2024-11-21
 */
public interface IOdPurchaseOrderService 
{
    /**
     * 查询进货订单
     * 
     * @param phId 进货订单主键
     * @return 进货订单
     */
    public OdPurchaseOrder selectOdPurchaseOrderByPhId(Integer phId);

    /**
     * 查询进货订单列表
     * 
     * @param odPurchaseOrder 进货订单
     * @return 进货订单集合
     */
    public List<OdPurchaseOrder> selectOdPurchaseOrderList(OdPurchaseOrder odPurchaseOrder);

    public List<OdPurchaseDetails> selectOdPurchaseDetailsList(OdPurchaseDetails odPurchaseDetails);

    /**
     * 新增进货订单
     * 
     * @param odPurchaseOrder 进货订单
     * @return 结果
     */
    public int insertOdPurchaseOrder(OdPurchaseOrder odPurchaseOrder);

    /**
     * 修改进货订单
     * 
     * @param odPurchaseOrder 进货订单
     * @return 结果
     */
    public int updateOdPurchaseOrder(OdPurchaseOrder odPurchaseOrder);

    /**
     * 批量删除进货订单
     * 
     * @param phIds 需要删除的进货订单主键集合
     * @return 结果
     */
    public int deleteOdPurchaseOrderByPhIds(Integer[] phIds);

    public int deleteDetailsByPhCode(String phCode);

    /**
     * 删除进货订单信息
     * 
     * @param phId 进货订单主键
     * @return 结果
     */
    public int deleteOdPurchaseOrderByPhId(Integer phId);

    /**
     * 进步部门
     */
    List<SysDept> selectAllSysDept();

    List<SysDept> selectAllSysDeptByParentId(@Param("deptid") Long deptid);

    List<SysUser> selectAllSysUser(@Param("deptid") Long deptId);

    SysUser selectBySysUserName( @Param("userName") String userName );


    int checkById(Map<String,Object> map);

    int revokeById(@Param("phid") Integer phid);

    List<OdPurchaseOrder> selectOdPurchaseOrderByInRejected(OdPurchaseOrder odPurchaseOrder);

    int colseById(@Param("phid") Integer phid);

    Map<String,Object> selectByPhCode(@Param("phCode") String phCode);
}
